unit UAddDoctorPerc;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs,udmitems,udmperson, cxGraphics,
  cxControls, cxLookAndFeels, cxLookAndFeelPainters, cxStyles, dxSkinsCore,
  dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
  dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
  dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
  dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
  dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
  dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
  dxSkinOffice2010Black, dxSkinOffice2010Blue, dxSkinOffice2010Silver,
  dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
  dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
  dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010,
  dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter, cxCustomData,
  cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator, Data.DB, cxDBData,
  cxContainer, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
  cxTextEdit, cxDBEdit, Vcl.StdCtrls, cxGridLevel, cxClasses, cxGridCustomView,
  cxGrid, DBAdvGlowNavigator, AdvPanel, Vcl.ExtCtrls, cxRadioGroup, cxGroupBox,
  cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox;

type
  TFAddDoctorPerc = class(TForm)
    AdvPanel1: TAdvPanel;
    AdvPanelStyler1: TAdvPanelStyler;
    DBAdvGlowNavigator1: TDBAdvGlowNavigator;
    cxGrid1DBTableView1: TcxGridDBTableView;
    cxGrid1Level1: TcxGridLevel;
    cxGrid1: TcxGrid;
    Label1: TLabel;
    Label2: TLabel;
    cxGrid1DBTableView1coef_item_id: TcxGridDBColumn;
    cxGrid1DBTableView1doctor_id: TcxGridDBColumn;
    cxGrid1DBTableView1percentage: TcxGridDBColumn;
    cxGrid1DBTableView1flag: TcxGridDBColumn;
    cxGroupBox1: TcxGroupBox;
    AdvPanel2: TAdvPanel;
    cxDBLookupComboBox1: TcxDBLookupComboBox;
    cxDBLookupComboBox2: TcxDBLookupComboBox;
    Label4: TLabel;
    cxDBTextEdit1: TcxDBTextEdit;
    cxDBRadioGroup1: TcxDBRadioGroup;
    procedure DBAdvGlowNavigator1BtnCancel(Sender: TObject);
    procedure DBAdvGlowNavigator1BtnEdit(Sender: TObject);
    procedure DBAdvGlowNavigator1BtnNext(Sender: TObject);
    procedure DBAdvGlowNavigator1BtnPost(Sender: TObject);
    procedure DBAdvGlowNavigator1BtnInsert(Sender: TObject);
    procedure DBAdvGlowNavigator1BtnLast(Sender: TObject);
    procedure DBAdvGlowNavigator1BtnPrior(Sender: TObject);
    procedure DBAdvGlowNavigator1BtnRefresh(Sender: TObject);
    procedure DBAdvGlowNavigator1BtnFirst(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FAddDoctorPerc: TFAddDoctorPerc;

implementation

{$R *.dfm}

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnCancel(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := false;
  DMItems.his_items_doctor_perc.Cancel;
end;

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnEdit(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := true;
  DMItems.his_items_doctor_perc.Edit;
end;

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnFirst(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := false;
  DMItems.his_items_doctor_perc.First;
end;

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnInsert(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := true;
  DMItems.his_items_doctor_perc.Insert;
end;

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnLast(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := false;
  DMItems.his_items_doctor_perc.Last;
end;

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnNext(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := false;
  DMItems.his_items_doctor_perc.Next;
end;

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnPost(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := true;
  DMItems.his_items_doctor_perc.Post;
  DMItems.his_items_doctor_perc.RefreshRecord;
  Self.AdvPanel1.Enabled := false;
end;

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnPrior(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := false;
  DMItems.his_items_doctor_perc.Prior;
end;

procedure TFAddDoctorPerc.DBAdvGlowNavigator1BtnRefresh(Sender: TObject);
begin
  Self.AdvPanel1.Enabled := false;
  DMItems.his_items_doctor_perc.RefreshRecord;
end;

procedure TFAddDoctorPerc.FormActivate(Sender: TObject);
begin
  DMItems.his_items_coef_list_comb.Refresh;
  DMPerson.his_person_doctor.Refresh;
end;

end.
